#include "GameList.h"
#include "dkglMain.h"


#pragma comment(lib, "DevIL.lib")
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "glu32.lib")


#ifdef _DEBUG
	#pragma comment(lib, "dkgl_d.lib")
	#pragma comment(lib, "OIS_static_d.lib")
#else
	#pragma comment(lib, "dkgl.lib")
#endif

int WINAPI WinMain(HINSTANCE hInstance,
	HINSTANCE hPrevInstance,
	PSTR szCmdLine, int iCmdShow)
{

	try
	{
		// try to initial dkgl system, alloc needed system resource, 3rd party libs...
		DKGL::DKGLMain _main;

		GameManager& _gameMgr = GameManager::instance();

		_main.registerKeyboardHandler(&_gameMgr);
		_main.registerMouseHandler(&_gameMgr);

		TankWar _war;

		_gameMgr.start(&_war);

		_main.go();		
	}
	catch (...)
	{
		assert(0);
	}

	return 0;
}